import React from 'react'
import './houseList.scss'
export default class HouseList extends React.Component{
    render(){
        let houseList=this.props.houseList
        return <>
               {houseList.map(item=>{
                    return <div className='list-item' key={item.houseCode}>
                        <img src={`http://localhost:8080${item.houseImg}`} alt="" />
                        <div className='item-right'>
                            <p className='item-name'>{item.title}</p>
                            <p className='item-des'>{item.desc}</p>
                            <p className='item-tag'>
                                {item.tags.map((tag,index)=>{
                                    return <span key={index}>{tag}</span>
                                })}
                            </p>
                            <p className='item-price'>{item.price} 元/月</p>
                        </div>
                    </div>
                })}
            </>
    }
}